#ifndef FILE_RW_H
#define FILE_RW_H
#include "common.h"

typedef void (*Callback)(void *);

class FileReader
{
private:
	int fin;
public:
	FileReader(const char *fileName);
	~FileReader();

	bool asyncRead(char *buffer, int offset, int len, Callback callback);
};

class FileWriter
{
private:
	int fout;
public:
	FileWriter(const char *fileName);
	~FileWriter();

	bool asyncWrite(const char *buffer, int offset, int len, Callback callback);
};

#endif//FILE_RW_H
